package com.xyazm.order.remote;

import com.xyazm.common.core.JsonResult;
import com.xyazm.common.utils.CheckResultUtil;
import com.xyazm.order.exception.OrderBizException;
import com.xyazm.risk.api.IRiskApi;
import com.xyazm.risk.domain.dto.CheckOrderRiskDTO;
import com.xyazm.risk.domain.param.CheckOrderRiskParam;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Component;

/**
 * 风控服务远程调用接口
 * @author xuyou
 * @date 2022年08月24日 20:59
 */
@Component
@Slf4j
public class RiskRemote {

    /**
     * 风控服务
     */
    @DubboReference(version = "1.0.0", retries = 0)
    private IRiskApi riskApi;


    public CheckOrderRiskDTO checkOrderRisk(CheckOrderRiskParam checkOrderRiskParam) {
        //JsonResult<CheckOrderRiskDTO> jsonResult = riskApi.checkOrderRisk(checkOrderRiskParam);
        //CheckResultUtil.checkResult(jsonResult,"订单风控检查");
        //return jsonResult.getData();
        log.info("远程调用风控服务");
        return null;
    }

}
